import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import MyComponent from "../components/MyComponent";
import AddEmp from "../components/AddEmp";
import ShowEmp from "../components/ShowEmp";
import UpdateEmp from "../components/UpdateEmp";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'HelloWorld',
      component: HelloWorld
    },
    {
      path: "/showAll",
      component: MyComponent,
      children:[
        {
          path: "/show",
          component: ShowEmp
        },
        {
          path: "/add",
          component: AddEmp
        },
        {
          path: "/update",
          component: UpdateEmp
        }
      ]
    }
  ]
})
